/*    */ package com.iris.egrant.hibernate;
/*    */ 
/*    */ import com.iris.egrant.app.utils.IrisStringUtils;
/*    */ import java.io.Serializable;
/*    */ import java.sql.Clob;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ import org.hibernate.transform.BasicTransformerAdapter;
/*    */ 
/*    */ public class IrisAliasToEntityMapResultTransformer
/*    */   extends BasicTransformerAdapter
/*    */   implements Serializable {
/* 13 */   public static final IrisAliasToEntityMapResultTransformer INSTANCE = new IrisAliasToEntityMapResultTransformer();
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   public Object transformTuple(Object[] tuple, String[] aliases) {
/* 20 */     Map<Object, Object> result = new HashMap<Object, Object>(tuple.length);
/* 21 */     for (int i = 0; i < tuple.length; i++) {
/* 22 */       String alias = aliases[i];
/* 23 */       if (alias != null) {
/* 24 */         Object t = tuple[i];
/* 25 */         if (t instanceof Clob) {
/* 26 */           t = IrisStringUtils.clob2str((Clob)t);
/*    */         }
/* 28 */         result.put(alias, t);
/*    */       } 
/*    */     } 
/* 31 */     return result;
/*    */   }
/*    */   
/*    */   private Object readResolve() {
/* 35 */     return INSTANCE;
/*    */   }
/*    */ }


/* Location:              D:\文件kjt\WEB-INF\lib\egrant-core-2.2.20240205.1659.jar!\com\iris\egrant\hibernate\IrisAliasToEntityMapResultTransformer.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       1.1.3
 */